/*
 * WorstFitArea.h
 *
 *  Created on: 04.03.2011
 *      Author: marco
 */

#ifndef WORSTFITAREA_H_
#define WORSTFITAREA_H_

enum WorstFitAreaType {
	process, hole
};

#include "Area.h"

class WorstFitArea: public Area {
private:
	WorstFitAreaType type;
	WorstFitArea* next;
	WorstFitArea* previous;

//protected:
//	int size;
//	int base;
//	int ends;
public:
	WorstFitArea(WorstFitAreaType, int, int, WorstFitArea*, WorstFitArea*);
	WorstFitArea* getNext();
	WorstFitArea* getPrevious();
	bool hasNext();
	bool hasPrevious();
	WorstFitAreaType getType();
	WorstFitArea* allocate(int);
	void free();
	void setPrevious(WorstFitArea*);
	void setNext(WorstFitArea*);
	void setBase(int);
	void setSize(int);
	bool previousIsHole();
	bool nextIsHole();
	virtual ~WorstFitArea();
};

#endif /* WORSTFITAREA_H_ */
